import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    booksList:[],
    mhList:[],
  },
  mutations: {
    setBooksList(state,payload){
      state.booksList=[...payload]
    },
    setMhlist(state,payload){
      state.mhList=[...payload]
    },
    setreverse(state,cb){
      state.mhList = state.mhList.reverse()
      cb&&cb();
    }
  },
  actions: {
  },
  modules: {
  }
})
